﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ComponentFactory.Krypton.Toolkit;
using Xeml.Document.Contracts;
using Xeml.Document;
using Xeml.Document.XemlEventArgs;
using Xeml.Sampling.Contracts;

namespace Xid.Controls.SampleCompiler
{
    public partial class DataMappingFrm : KryptonForm
    {
        public IOntologyTerm SelectedTerm { get; private set; }


        public DataMappingFrm(IDocument xemlDoc, DataProviderResource dataProvider)
        {
            InitializeComponent();
            dataMappingCtrl1.Setup(xemlDoc, dataProvider);
        }

        public void SelectedSampleChanged(object sender, ObservationPointSelectedEventArgs e)
        {
            dataMappingCtrl1.OnSelectedObservationPointChanged(sender, e);
        }


        private void kryptonButtonOk_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.Close();
        }

        private void kryptonButtonCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.Close();
        }


    }
}
